<% %>
<div class=page_head>
<span></span>
<h2><%='Add a milestone'.t%></h2>
</div>
<script>
 Date.weekdays = $w("0 1 2 3 4 5 6");
 Date.months   = $w("Jan Feb Mar Apr May Jun Jul Agu Sep Oct Nov Dec");
</script>

<% form_for(:milestone, :url => milestone_path, :html => {:method=>'put'}) do |f| %>
 <div class="float_right add_milestone">
    <%="Enter a title for this milestone".t%>:<span class=intro_txt>(<%="Ex: Design Review 2".t%>)</span><br />
    <%= f.text_field :name,:size=>30,:class=>'big'%><br /><br />
    <%="Who is response for?".t%><br />
    <select name=milestone[user_id]>
    <option><%="Anyone".t%></option>
    <option value=<%=@cur_user.id%> <%=(@milestone.user_id ==@cur_user.id ? "selected":"")%>><%="Me".t%>(<%=@cur_user.name%>)</option>
    <option>------------</option>
    <%=options_from_collection_for_select @project.users - [@cur_user],"id","name",@milestone.user_id%>
    </select>
    <br/>
     <span class="private_label"><%="Private".t%><%=f.check_box :private%></span>
    <br/>
    <!-- <%=f.check_box "mail_alert",:checked=>'checked'%> <%="Email now & 48-hours before it's due".t%> -->
    <%=f.hidden_field "project_id",:value=>params[:project_id]%>
    <br/>
    <hr size=1>
    <br/>
    <%=indicator('sub')%>
    <%= submit_tag "Save this milestone".t,:id=>'sub_ms',:onclick=>"Element.show('indicator_sub')" %>
    or <%=link_to image_tag("trash.gif",:border=>0),milestone_path,:method=>'delete',:confirm=>"Are you sure?".t,:class=>'admin'%>
    or <%=link_to "Cancel".t,"javascript:history.back(-1)",:onclick=>"Element.hide('new_ms');Element.show('all_ms')",:class=>'admin'%>
 </div>
    <%="When's it due?".t%><br />
    <%=calendar_date_select_tag "milestone[due_at]",@milestone.due_at.strftime("%Y-%m-%d"), :embedded => true, :year_range =>0%>
<% end %>
